package com.example.dubbo.provider.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.dubbo.provider.entity.Storage;
import com.example.dubbo.provider.mapper.StorageMapper;
import com.example.dubbo.service.StorageService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Component;

/**
 * @author zxs
 * @since 2021/5/31
 */
@DubboService
@Component
public class StorageServiceImpl extends ServiceImpl<StorageMapper, Storage> implements StorageService {
    @Override
    public void purseStorage() {
        Storage storage =new Storage();
        storage.setName("库存");
        this.save(storage);
        System.out.println("减库存成功");
        throw new RuntimeException();
    }
}
